package com.boot2.core.conf;

import lombok.Data;

/**
 * @author zhangweilin
 * @description:Cors 配置项
 * @date 2018/7/26
 */
@Data
public class CorsRegistrationConfig {

    /**
     * 要匹配的路径前缀
     */
    private String mapping="/**";

    /**
     * Credentials of CORS,是否允许认证，
     */
    private Boolean allowCredentials;

    /**
     * 允许的方法，如"GET", "HEAD", "POST","PUT", "DELETE", "OPTIONS"
     */
    private String allowedMethods= "POST,GET,DELETE,PUT";

    /**
     * 允许的头
     */
    private String allowedHeaders= "*";

    /**
     * 允许的请求来源
     */
    private String allowedOrigins= "*";

    /**
     * 要匹配的路径前缀
     */
    private String exposedHeaders;


    /**
     * 最大时间
     */
    private Long maxAge;

}
